package com.gator.desig_mode.bridge;

import java.lang.ref.PhantomReference;

//手机样式
public abstract class Phone {

  private Brand brand;

  public Phone(Brand brand) {
    this.brand = brand;
  }

  protected void call(){
    brand.call();
  }
}


//折叠手机
class FoldedPhone extends Phone {

  public FoldedPhone(Brand brand) {
    super(brand);
  }

  @Override
  protected void call() {
    super.call();
    System.out.println("折叠手机");
  }
}


//直板手机
class UpRightPhone extends Phone {

  public UpRightPhone(Brand brand) {
    super(brand);
  }

  @Override
  protected void call() {
    super.call();
    System.out.println("直板手机");
  }

}
